package br.com.ponto.mb;

import javax.faces.context.FacesContext;
import javax.servlet.http.HttpSession;

import br.com.ponto.model.Usuario;

public abstract class BaseMB {
	
	protected static final String USER_KEY = "USUARIO";

	protected Usuario getUsuario() {
		HttpSession session = (HttpSession) FacesContext.getCurrentInstance().getExternalContext().getSession(true);
		return (Usuario) session.getAttribute(USER_KEY);
	}
	
}
